<script language="javascript" type="text/javascript">
function tableOrdering( order, dir, task )
{
	var form = document.adminForm;
 
	form.filter_order.value = order;
	form.filter_order_Dir.value = dir;
	document.adminForm.submit( task );
}
function change()
{
	document.adminForm.submit();
}

</script>
<style type="text/css">
tr.sortable th img {
	margin-left: 5px;
}
#adminForm #editcell input {
	color: #666666;
}
</style>
<?php
//file chứa template đầu ra (this is the template for our output)
//Nhận dữ liệu trực tiếp từ View
/*
	*	@package joomla component
	*	component/com_hello/site/views/hello/tmpl/default.php
	*	@license	GNU/GPL
*/
//không cho phép truy cập trực tiếp
defined('_JEXEC') or die('Restricted Access');
?>


<?php
	$p=new Pager();
	$limit=10;
	$start=$p->findStart($limit);
    
	
	//so dong cua bang
	$count=count( $this->items );
	
	//tim tong so trang dua tren so dong vua co va gioi han cho mot trang
	$pages=$p->findPages($count,$limit);

?>

<div align="center"> 
	<span style="font:bold 18px 'Times New Roman', Times, serif;color:#000033"  >THÔNG TIN CỰU SINH VIÊN</span>
	<br />
	<br/>	<br />
	<br/>
	
<form id="adminForm" action="<?php echo JRoute::_( 'index.php' );?>" method="post" name="adminForm">
<div id="editcell"> 
	<div style="margin-bottom:10px;margin-top:-10px; float:left; clear:none">Tên sinh viên:  
		<input type="text" size=30 name="tensv" id="tensv"></input>
		<input name="Submit" type="submit" value="search">
		</input>
	</div>
	
	<div style="float:right;margin-bottom:10px;margin-top:-10px; clear:none">  
		<?php
		echo $this->lists['type'];
	?>
	</div>
	<br/>
	<br/>
    <table class="adminlist" border="2" bordercolor="#339900" cellspacing="0" width="700" align="center"> 
    <thead> 
      <font color="#FFFFFF">
		<tr bgcolor="#1BA406" height="28"> 
		
            <th  > 
                <font color="#FFFFFF" size="2"><?php echo JText::_( 'Mã sinh viên' ); ?></font>            </th> 
            <th > 
                <font color="#FFFFFF" size="2"><?php echo JText::_( 'Tên Sinh viên' ); ?> </font>            </th> 
			<th > 
                <font color="#FFFFFF" size="2"><?php echo JText::_( 'Khóa học' ); ?> </font>            </th> 
			<th > 
                <font color="#FFFFFF" size="2"><?php echo JText::_( 'Lớp' ); ?> </font>            </th> 
			<th > 
                <font color="#FFFFFF" size="2"><?php echo JText::_( 'Mã ngành' ); ?> </font>            </th> 
			<th > 
                <font color="#FFFFFF" size="2"><?php echo JText::_( 'Loại tốt nghiệp' ); ?> </font>            </th> 
			<th > 
                <font color="#FFFFFF" size="2" ><?php echo JText::_( 'Đề tài tốt nghiệp' ); ?> </font>            </th> 
			<th> 
                <font color="#FFFFFF" size="2"><?php echo JText::_( 'Quê quán' ); ?> </font>            </th> 
		 
        </tr>
		         
    </thead> 
    <?php 
    $k = 0; 
	if(($start+$limit) <= $count ){
		$n=$start+$limit;
	}
	else
	{
		$n=$count;
	}
    for ($i=$start; $i < $n; $i++) 
    { 					
	        $row =& $this->items[$i]; 
			
        ?> 
	<?php	if($k%2==0){
				echo "<tr align='center' bgcolor='#EBF5F5'>";
				$color='#000000';
			}
		else
      {echo "<tr align='center'>"; 
	  	}
		
	  ?>
            <td height="28"  > 
               <?php echo "<font color=$color>".$row->masv."</font>"; ?> 
            </td> 
            <td> 
                <?php echo "<font color=$color>".$row->tensv."</font>"; ?> 
            </td >
			<td> 
                <?php echo "<font color=$color>".$row->khoahoc."</font>"; ?> 
            </td> 
			<td> 
                <?php echo "<font color=$color>".$row->lop."</font>"; ?> 
            </td>
			<td > 
                <?php echo "<font color=$color>".$row->manganh."</font>"; ?> 
            </td>
			<td> 
                <?php echo "<font color=$color>".$row->loaitotnghiep."</font>"; ?> 
            </td>
			<td> 
                <?php echo "<font color=$color>".$row->detaitotnghiep."</font>"; ?> 
            </td>
			<td> 
                <?php echo "<font color=$color>".$row->quequan."</font>"; ?> 
            </td>
		<?php
			echo "</font>";
		?>
      </tr> 
        <?php 
        $k += 1 ; 
		
    } 
    ?> 
  </table> 
  
  <div align="center"><br/>
  <?php
	//xuat danh sach trang
	
	$pagelist = $p->pageList($_GET['page'],$pages);
	echo $pagelist;
	
  ?>
  </div>
</div>
</div>
  </form>
